package v2;

import context.ApplicationContext;
import context.support.ClassPathXmlApplicationContext;
import static org.junit.Assert.*;
import org.junit.Test;
import service.v2.PetStoreService;
/**
 * Created by ZhaiGuaili on 2018/7/20.
 */
public class ApplicationContextTestV2 {

    @Test
    public void testGetBeanProperty() throws Exception{
        ApplicationContext context = new ClassPathXmlApplicationContext("petstore-v2.xml");
        PetStoreService petStoreService = (PetStoreService)context.getBean("petStore2");
        assertNotNull(petStoreService.getAccountDao());
        assertNotNull(petStoreService.getItemDao());

    }
}
